package com.test.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public class testController {

    @PostMapping("test")
    public String test1(@RequestBody List<User> list){
        return list.toString();
    }

    @PostMapping("demo")
    public String demo(@RequestBody User user){
        return "你好"+user.toString();
    }

    @GetMapping("getDemo")
    public String getDemo(String id,String age){
        return id+age;
    }

    @PostMapping
    public String postTest(@RequestBody Map<String,String> map){
        return map.toString();
    }
}
